let store = {};
let emitter = {
    on(type,handler){
        store[type]= handler
    },
    emit(type){
        store[type]();
    }
}

let emitter2 = {
    mutation(type,handler){
        store[type]= handler
    },
    commit(type){
        store[type]();
    }
}
emitter2.mutation('increase',()=>console.log('increase'));
emitter2.commit('increase');